package org.example;

public class Main {
    public static void main(String[] args) {
        //水仙花数
        for (int i = 100; i < 1000; i++) {
            int gewei = i % 10 ;
            int shiwei = i /10 % 10;
            int baiwei = i /100;
            if (Math.pow(gewei,3)+Math.pow(shiwei,3)+Math.pow(baiwei,3)==i){
                System.out.println("水仙花数为"+i);
            }
            else {
                System.out.println("不是水仙花数");
            }
        }
    }
}